//
//  CDSubscribeController.m
//  栏目中心Demo
//
//  Created by liaoxingchi on 16/9/23.
//  Copyright © 2016年 liaoxingchi. All rights reserved.
//

#import "CDSubscribeController.h"
#import "Masonry.h"

@interface CDSubscribeController ()

@end

@implementation CDSubscribeController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [self setupUI];
}

// 初始化UI
- (void)setupUI {
    // 创建控件
    UILabel *signInLabel = [[UILabel alloc] init];
    signInLabel.text = @"未登录";
    signInLabel.textColor = [UIColor lightGrayColor];
    signInLabel.font = [UIFont systemFontOfSize:16];
    [self.view addSubview:signInLabel];
    UILabel *followLabel = [[UILabel alloc] init];
    followLabel.text = @"登录后你关注的栏目更新可以在这里查看";
    followLabel.font = [UIFont systemFontOfSize:12];
    [self.view addSubview:followLabel];
    // 图片
    UIImageView *imageView = [[UIImageView alloc] init];
    imageView.image = [UIImage imageNamed:@"NotLogin_image_night"];
    [self.view addSubview:imageView];
    // 按钮
    UIButton *signBtn = [[UIButton alloc] init];
    [signBtn setImage:[UIImage imageNamed:@"NotLogin_button"] forState:UIControlStateNormal];
    [self.view addSubview:signBtn];
    // 布局
    [signInLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(20);
        make.centerX.equalTo(self.view);
    }];
    [followLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(signInLabel.mas_bottom).mas_offset(15);
        make.centerX.equalTo(signInLabel);
    }];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.top.equalTo(followLabel.mas_bottom).mas_offset(20);
        make.width.offset(260);
        make.height.offset(294);
    }];
    [signBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(imageView.mas_bottom).mas_offset(36);
        make.centerX.equalTo(imageView);
        make.width.offset(161);
        make.height.offset(40);
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
